<?php
class Wall_AdminSettingsController extends Core_Controller_Action_Admin
{
  public function generalAction()
  {
    // Make form
    $this->view->form = $form = new Wall_Form_Admin_Settings_General();

    $settings = Engine_Api::_()->getApi('settings', 'core');
    $values = $settings->wall;

    $form->setAttrib('values', $values);

    $form->renderForm();
    if( !$this->getRequest()->isPost() ) {
      return;
    }
    if( !$form->isValid($this->getRequest()->getPost()) ) {
       return;
    }
    $req = $this->getRequest();
    //$values['richeditor']['enable'] = $req->getParam('richeditor_enable');
    $values['autoload']['limit'] = $req->getParam('autoload_limit');
    
    $settings->wall = $values;
  }
}